/**
 * 作者：陈文斌 on 2019/1/8.
 * 邮箱：chen_wennbin@163.com
 * 版本：v1.0
 */

import 'package:flutter/material.dart';
import 'package:crm/constant/constant.dart';
import 'package:crm/view/PromptBar/prompt_bar.dart';
import 'package:crm/page/ClientManager/import_client_page.dart';

class AddClientPromptBarSection extends StatelessWidget {
  final int clientType;

  AddClientPromptBarSection({Key key,this.clientType}):super(key:key);

  @override
  Widget build(BuildContext context) {
    return PromptBar(
      title: '快速导入客户信息',
      trailing: Container(
        width: 50,
        height: 17,
        decoration: BoxDecoration(
          color: AppColors.MainColor,
          borderRadius: BorderRadius.circular(8.5),
        ),
        child: ClipRRect(
          borderRadius: BorderRadius.circular(8.5),
          child: MaterialButton(
            onPressed: () {
              Navigator.push(
                context,
                MaterialPageRoute(
                  builder: (context) => ImportClientPage(clientType: clientType,),
                ),
              );
            },
            padding: EdgeInsets.all(0),
            child: Text(
              '导入',
              style: TextStyle(
                color: Colors.white,
                fontSize: AppFontSizes.Font12,
                fontFamily: AppFontFamilies.PingFangSC,
              ),
            ),
          ),
        ),
      ),
    );
  }
}
